﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
namespace SQT.tracnghiem.Ajax.ASP.User
{
    public partial class del_user : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = int.Parse(Request.QueryString["id"]);
            var get_result = new TblResultController().FetchAll().Where(x => x.ResultUser == id);
            foreach (TblResult result in get_result)
            {
                new TblResultController().Destroy(result.ResultId);
            }
            new TblUserController().Destroy(id);
        }
    }
}